overlay: Use gdk_window_new_child()
authorBenjamin Otte <otte@redhat.com>
Mon, 17 Oct 2016 18:21:21 +0000 (20:21 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 17 Oct 2016 22:22:35 +0000 (00:22 +0200)
gtk/gtkoverlay.c

index 29fc355cba4351bd1e5cb630b8f7d33b80026b31..9adffd8b94f34afb9e40bcd19faa014f6bf74278 100644 (file)
@@ -138,22 +138,12 @@ gtk_overlay_create_child_window (GtkOverlay *overlay,
   GtkWidget *widget = GTK_WIDGET (overlay);
   GtkAllocation allocation;
   GdkWindow *window;
-  GdkWindowAttr attributes;
-  gint attributes_mask;
 
   gtk_overlay_compute_child_allocation (overlay, child, &allocation, NULL);
 
-  attributes.window_type = GDK_WINDOW_CHILD;
-  attributes.wclass = GDK_INPUT_OUTPUT;
-  attributes.width = allocation.width;
-  attributes.height = allocation.height;
-  attributes.x = allocation.x;
-  attributes.y = allocation.y;
-  attributes_mask = GDK_WA_X | GDK_WA_Y;
-  attributes.event_mask = gtk_widget_get_events (widget);
-
-  window = gdk_window_new (gtk_widget_get_window (widget),
-                           &attributes, attributes_mask);
+  window = gdk_window_new_child (gtk_widget_get_window (widget),
+                                 gtk_widget_get_events (widget),
+                                 &allocation);
   gtk_widget_register_window (widget, window);
 
   gdk_window_set_pass_through (window, child->pass_through);